import request from '@/utils/request'
import { GEN_SERVER } from '@/config/baseUrl'

// 查询工段信息列表
export function listWorkSection(data) {
  return request({
    url: GEN_SERVER['produce-server'] + '/data/workSection/list',
    method: 'post',
    data: data
  })
}

// 查询工段信息详细
export function getWorkSection(id) {
  return request({
    url: GEN_SERVER['produce-server'] + '/data/workSection/detail',
    method: 'get',
    params: {
        id
    }
  })
}

// 新增/修改工段信息
export function addOrUpdateWorkSection(data) {
  return request({
    url: GEN_SERVER['produce-server'] + '/data/workSection/addOrUpdate',
    method: 'post',
    data: data
  })
}

// 删除工段信息
export function delWorkSection(id) {
  return request({
    url: GEN_SERVER['produce-server'] + '/data/workSection/deleteByIds',
    method: 'post',
    params: {
      ids: id
    }
  })
}

// 导出工段信息
export function exportWorkSection(query) {
  return request({
    url: GEN_SERVER['produce-server'] + '/data/workSection/export',
    method: 'post',
    data: query
  })
}
